

import { http } from "../../api/Home/index"

const state = {
  list: []
}
const mutations = {
  HTTPLIST(state, payload) {
    state.list = payload
  }
}
const actions = {
  async http_list(store, payload) {
    const res = await http()
    if (res.data.code === 200) {
      store.commit("HTTPLIST", res.data.data)
    } else {
      console.log("404")
    }
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}